#include<stdio.h>
int main()
{
	char arr[10] = { 0 };
	char* p = arr;
	gets(p);
	while (*p != '\0')
	{
		if (*p >= 'a' && *p <= 'z')
		{
			*p = *p ^ 32;
		}
		else if (*p >= 'A' && *p <= 'Z')
			{
				*p = *p ^ 32;
			}
		p++;
	}
	printf("%s", arr);
	return 0;
}